#ifndef WF_MODIFYTRIMAMOUNT_H
#define WF_MODIFYTRIMAMOUNT_H

#include "pf_previewactioninterface.h"
#include "pf_modification.h"
#include "gui_export.h"

/**
 * This action class can handle user events to trim entities by a given
 * amount.
 *
 */
class GUI_EXPORT WF_ModifyTrimAmount : public PF_ActionInterface {
	Q_OBJECT
public:
    /**
     * Action States.
     */
    enum Status {
        ChooseTrimEntity      /**< Choosing the entity to trim. */
    };

public:
    WF_ModifyTrimAmount(PF_Container& container,
                        PF_GraphicView& graphicView);
    ~WF_ModifyTrimAmount() {}

	static QAction* createGUIAction(LX_Define::ActionType /*type*/, QObject* /*parent*/);

	virtual LX_Define::ActionType rtti() {
		return LX_Define::ActionModifyTrimAmount;
	}

    virtual void init(int status=0);
	
    virtual void trigger();

    //virtual void mouseMoveEvent(PF_MouseEvent* e);
    virtual void mouseReleaseEvent(PF_MouseEvent* e);
	
    virtual void commandEvent(PF_CommandEvent* e);
	virtual PF_StringList getAvailableCommands();

    virtual void hideOptions();
    virtual void showOptions();
	
    virtual void updateMouseButtonHints();
    virtual void updateMouseCursor();
    virtual void updateToolBar();
	
	double getDistance() {
		return distance;
	}

	void setDistance(double d) {
		distance = d;
	}

private:
    PF_Entity* trimEntity;
	PF_Vector trimCoord;
	double distance;
	/**
	 * Commands
	 */
	/*
	PF_String cmdDistance;
	PF_String cmdDistance2;
	PF_String cmdDistance3;
	*/
};

#endif
